#include <stdio.h>

int main(void){
	double salary;
	double tax;
	printf("请你输入你的工资:\n");
	scanf("%lf",&salary);
	printf("税前工资：%lf \n",salary);
	salary = salary - (salary * 0.15);
	if(salary < 3500){
		printf("亲～你丫还不够纳税的资格！\n");
		tax = 0;
	}
	else if(salary < 5000){
		tax = (salary - 3500)*0.05;
	}
	else if(salary < 8000){
		tax = 75+(salary - 5000)*0.10;
	}
	else if(salary < 12000){
		tax = 75+300+(salary - 8000)*0.15;
	}
	else if(salary < 20000){
		tax = 75+300+600+(salary - 12000)*0.20;
	}
	else if(salary < 50000){
		tax = 75+900+1600+(salary - 20000)*0.30;
	}
	else if(salary < 100000){
		tax = 75+900+1600+9000+(salary - 50000)*0.40;
	}
	else{
		tax = 75+11500+(salary - 100000)*0.45;
	}
	printf("需纳税%lf\n",tax);
	printf("税后工资：%lf\n",salary - tax);
	return 0;
}
